import api from '../http'

export const login = (username,password) => {
	return api.http({
		url:'/user/shop/login/password',
		data:{
			username,
			password
		},
		method:'post'
	}).catch(err => err)
}


export const getShopUserListForPage = (queryForm) => {
	return api.http({
		url:'/user/shop/list/page',
		method:'get',
		params:queryForm
	})
}

export const insertShopUser = (addForm) => {
	return api.http({
		url:'/user/shop/insert',
		method:'put',
		data:addForm
	})
}

export const findShopUserById = (id) => {
	return api.http({
		url:`/user/shop/find/id/${id}`,
		method:'get',
		data:id
	})
}

export const updateShopUser = (addForm) => {
	return api.http({
		url:`/user/shop/update`,
		method:'put',
		data:addForm
	})
}

export const deleteShopUserById = (id) => {
	return api.http({
		url:`/user/shop/delete/id/${id}`,
		method:'delete',
	})
}


export const setShopUserFreeze = (params) => {
	return api.http({
		url:`/user/shop/set/freeze`,
		method:'get',
		params
	})
}
